package com.nt.train.vo;

/**
 * @author hlf
 * @version 1.0
 * @date 2022/9/21 13:36
 */
public class BasicStudent {

    private int id;

    private String name;

    private String sex;

    private Integer age;

    public BasicStudent() {

    }

    BasicStudent(int id, String name, String sex, Integer age) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
    }


    public static BasicStudentBuilder builder() {
        return new BasicStudentBuilder();
    }

    public static class BasicStudentBuilder {
        private int id;
        private String name;
        private String sex;
        private Integer age;

        BasicStudentBuilder() {
        }

        public BasicStudentBuilder id(int id) {
            this.id = id;
            return this;
        }

        public BasicStudentBuilder name(String name) {
            this.name = name;
            return this;
        }

        public BasicStudentBuilder sex(String sex) {
            this.sex = sex;
            return this;
        }

        public BasicStudentBuilder age(Integer age) {
            this.age = age;
            return this;
        }

        public BasicStudent build() {
            return new BasicStudent(id, name, sex, age);
        }

        @Override
        public String toString() {
            return "BasicStudent.BasicStudentBuilder(id=" + this.id + ", name=" + this.name + ", sex=" + this.sex + ", age=" + this.age + ")";
        }
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
